extends layout

block content
    -var imagelikes = likes ? likes : 0
    -var imagevisit = visit ? visit : 0
    .row
        .col-12.col-md-8
            .card
                img.card-img-top(src=`/uploads/${diskfilename}`,alt=title)
                .card-body.d-flex.justify-content-between
                    div.inline-block
                        span= title
                        i.fas.fa-heart
                        span.likecount= imagelikes
                        i.fas.fa-eye
                        span= imagevisit
                    button.btn.btn-primary#likes-btn(data-imageid=_id)
                        i.far.fa-heart like
                .list-group.mt-1
                    each comment in comments
                        li.list-group-item
                            p= comment.comment
                            p= comment.nickname
                            p= comment.email
        .col-12.col-md-4
            include includes/stats.pug
            include includes/comment.pug
    .row
        .col-12.col-md-8
            .card
                .card-body
                    h4.card-title Express Your's Opinions.
                    form(action=`/comments/${_id}`,method="post") 
                        .form-group.row
                            label.col-12.col-md-2 Email
                            input.col-12.col-md-10.form-control(type="email",name="email")
                        .form-group.row
                            label.col-12.col-md-2 Pet Name
                            input.col-12.col-md-10.form-control(type="text",name="nickname")
                        .form-group.row
                            label.col-12.col-md-2 Comment
                            textarea.col-12.col-md-10.form-control(rows="5",name="comment")
                        .form-group.row
                            .col-12.offset-md-8.col-md-4
                                button.btn.btn-primary.btn-block(type='submit') Save Comment
    include includes/footer.pug
    script(src="/javascripts/show.js")
    script(src="/javascripts/TweenLite.min.js")
    script(src="/javascripts/three.min.js")
    script(src="/javascripts/rAF.js")
    script(src="/javascripts/one.js")
    //- script(src="/javascripts/index.js")
    script(src="/javascripts/html5.js")
    script(src="/javascripts/EasePack.min.js")
    //- script(src="/javascripts/demo-1.js")
    //- script(src="/javascripts/bootstrap.min.js")
    script(src="/javascripts/text.js")